(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(x, l)) → l
length(nil) → 0
length(cons(x, l)) → s(length(l))
ge(u, 0) → true
ge(0, s(v)) → false
ge(s(u), s(v)) → ge(u, v)

Rewrite Strategy: INNERMOST

(1) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(2) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(x, l)) → l
length(nil) → 0'
length(cons(x, l)) → s(length(l))
ge(u, 0') → true
ge(0', s(v)) → false
ge(s(u), s(v)) → ge(u, v)

S is empty.
Rewrite Strategy: INNERMOST

(3) SlicingProof (LOWER BOUND(ID) transformation)

Sliced the following arguments:
cons/0

(4) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(l)) → l
length(nil) → 0'
length(cons(l)) → s(length(l))
ge(u, 0') → true
ge(0', s(v)) → false
ge(s(u), s(v)) → ge(u, v)

S is empty.
Rewrite Strategy: INNERMOST

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

Innermost TRS:
Rules:
nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(l)) → l
length(nil) → 0'
length(cons(l)) → s(length(l))
ge(u, 0') → true
ge(0', s(v)) → false
ge(s(u), s(v)) → ge(u, v)

Types:
nthtail :: s:0' → nil:cons → nil:cons
cond :: true:false → s:0' → nil:cons → nil:cons
ge :: s:0' → s:0' → true:false
length :: nil:cons → s:0'
true :: true:false
false :: true:false
tail :: nil:cons → nil:cons
s :: s:0' → s:0'
nil :: nil:cons
cons :: nil:cons → nil:cons
0' :: s:0'
hole_nil:cons1_0 :: nil:cons
hole_s:0'2_0 :: s:0'
hole_true:false3_0 :: true:false
gen_nil:cons4_0 :: Nat → nil:cons
gen_s:0'5_0 :: Nat → s:0'

(7) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
nthtail, ge, length

They will be analysed ascendingly in the following order:
ge < nthtail
length < nthtail

(8) Obligation:

Innermost TRS:
Rules:
nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(l)) → l
length(nil) → 0'
length(cons(l)) → s(length(l))
ge(u, 0') → true
ge(0', s(v)) → false
ge(s(u), s(v)) → ge(u, v)

Types:
nthtail :: s:0' → nil:cons → nil:cons
cond :: true:false → s:0' → nil:cons → nil:cons
ge :: s:0' → s:0' → true:false
length :: nil:cons → s:0'
true :: true:false
false :: true:false
tail :: nil:cons → nil:cons
s :: s:0' → s:0'
nil :: nil:cons
cons :: nil:cons → nil:cons
0' :: s:0'
hole_nil:cons1_0 :: nil:cons
hole_s:0'2_0 :: s:0'
hole_true:false3_0 :: true:false
gen_nil:cons4_0 :: Nat → nil:cons
gen_s:0'5_0 :: Nat → s:0'

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(gen_nil:cons4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))

The following defined symbols remain to be analysed:
ge, nthtail, length

They will be analysed ascendingly in the following order:
ge < nthtail
length < nthtail

(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
ge(gen_s:0'5_0(n7_0), gen_s:0'5_0(n7_0)) → true, rt ∈ Ω(1 + n70)

Induction Base:
ge(gen_s:0'5_0(0), gen_s:0'5_0(0)) →RΩ(1)
true

Induction Step:
ge(gen_s:0'5_0(+(n7_0, 1)), gen_s:0'5_0(+(n7_0, 1))) →RΩ(1)
ge(gen_s:0'5_0(n7_0), gen_s:0'5_0(n7_0)) →IH
true

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(10) Complex Obligation (BEST)

(11) Obligation:

Innermost TRS:
Rules:
nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(l)) → l
length(nil) → 0'
length(cons(l)) → s(length(l))
ge(u, 0') → true
ge(0', s(v)) → false
ge(s(u), s(v)) → ge(u, v)

Types:
nthtail :: s:0' → nil:cons → nil:cons
cond :: true:false → s:0' → nil:cons → nil:cons
ge :: s:0' → s:0' → true:false
length :: nil:cons → s:0'
true :: true:false
false :: true:false
tail :: nil:cons → nil:cons
s :: s:0' → s:0'
nil :: nil:cons
cons :: nil:cons → nil:cons
0' :: s:0'
hole_nil:cons1_0 :: nil:cons
hole_s:0'2_0 :: s:0'
hole_true:false3_0 :: true:false
gen_nil:cons4_0 :: Nat → nil:cons
gen_s:0'5_0 :: Nat → s:0'

Lemmas:
ge(gen_s:0'5_0(n7_0), gen_s:0'5_0(n7_0)) → true, rt ∈ Ω(1 + n70)

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(gen_nil:cons4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))

The following defined symbols remain to be analysed:
length, nthtail

They will be analysed ascendingly in the following order:
length < nthtail

(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
length(gen_nil:cons4_0(n294_0)) → gen_s:0'5_0(n294_0), rt ∈ Ω(1 + n2940)

Induction Base:
length(gen_nil:cons4_0(0)) →RΩ(1)
0'

Induction Step:
length(gen_nil:cons4_0(+(n294_0, 1))) →RΩ(1)
s(length(gen_nil:cons4_0(n294_0))) →IH
s(gen_s:0'5_0(c295_0))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(13) Complex Obligation (BEST)

(14) Obligation:

Innermost TRS:
Rules:
nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(l)) → l
length(nil) → 0'
length(cons(l)) → s(length(l))
ge(u, 0') → true
ge(0', s(v)) → false
ge(s(u), s(v)) → ge(u, v)

Types:
nthtail :: s:0' → nil:cons → nil:cons
cond :: true:false → s:0' → nil:cons → nil:cons
ge :: s:0' → s:0' → true:false
length :: nil:cons → s:0'
true :: true:false
false :: true:false
tail :: nil:cons → nil:cons
s :: s:0' → s:0'
nil :: nil:cons
cons :: nil:cons → nil:cons
0' :: s:0'
hole_nil:cons1_0 :: nil:cons
hole_s:0'2_0 :: s:0'
hole_true:false3_0 :: true:false
gen_nil:cons4_0 :: Nat → nil:cons
gen_s:0'5_0 :: Nat → s:0'

Lemmas:
ge(gen_s:0'5_0(n7_0), gen_s:0'5_0(n7_0)) → true, rt ∈ Ω(1 + n70)
length(gen_nil:cons4_0(n294_0)) → gen_s:0'5_0(n294_0), rt ∈ Ω(1 + n2940)

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(gen_nil:cons4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))

The following defined symbols remain to be analysed:
nthtail

(15) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol nthtail.

(16) Obligation:

Innermost TRS:
Rules:
nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(l)) → l
length(nil) → 0'
length(cons(l)) → s(length(l))
ge(u, 0') → true
ge(0', s(v)) → false
ge(s(u), s(v)) → ge(u, v)

Types:
nthtail :: s:0' → nil:cons → nil:cons
cond :: true:false → s:0' → nil:cons → nil:cons
ge :: s:0' → s:0' → true:false
length :: nil:cons → s:0'
true :: true:false
false :: true:false
tail :: nil:cons → nil:cons
s :: s:0' → s:0'
nil :: nil:cons
cons :: nil:cons → nil:cons
0' :: s:0'
hole_nil:cons1_0 :: nil:cons
hole_s:0'2_0 :: s:0'
hole_true:false3_0 :: true:false
gen_nil:cons4_0 :: Nat → nil:cons
gen_s:0'5_0 :: Nat → s:0'

Lemmas:
ge(gen_s:0'5_0(n7_0), gen_s:0'5_0(n7_0)) → true, rt ∈ Ω(1 + n70)
length(gen_nil:cons4_0(n294_0)) → gen_s:0'5_0(n294_0), rt ∈ Ω(1 + n2940)

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(gen_nil:cons4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))

No more defined symbols left to analyse.

(17) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
ge(gen_s:0'5_0(n7_0), gen_s:0'5_0(n7_0)) → true, rt ∈ Ω(1 + n70)

(18) BOUNDS(n^1, INF)

(19) Obligation:

Innermost TRS:
Rules:
nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(l)) → l
length(nil) → 0'
length(cons(l)) → s(length(l))
ge(u, 0') → true
ge(0', s(v)) → false
ge(s(u), s(v)) → ge(u, v)

Types:
nthtail :: s:0' → nil:cons → nil:cons
cond :: true:false → s:0' → nil:cons → nil:cons
ge :: s:0' → s:0' → true:false
length :: nil:cons → s:0'
true :: true:false
false :: true:false
tail :: nil:cons → nil:cons
s :: s:0' → s:0'
nil :: nil:cons
cons :: nil:cons → nil:cons
0' :: s:0'
hole_nil:cons1_0 :: nil:cons
hole_s:0'2_0 :: s:0'
hole_true:false3_0 :: true:false
gen_nil:cons4_0 :: Nat → nil:cons
gen_s:0'5_0 :: Nat → s:0'

Lemmas:
ge(gen_s:0'5_0(n7_0), gen_s:0'5_0(n7_0)) → true, rt ∈ Ω(1 + n70)
length(gen_nil:cons4_0(n294_0)) → gen_s:0'5_0(n294_0), rt ∈ Ω(1 + n2940)

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(gen_nil:cons4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))

No more defined symbols left to analyse.

(20) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
ge(gen_s:0'5_0(n7_0), gen_s:0'5_0(n7_0)) → true, rt ∈ Ω(1 + n70)

(21) BOUNDS(n^1, INF)

(22) Obligation:

Innermost TRS:
Rules:
nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(l)) → l
length(nil) → 0'
length(cons(l)) → s(length(l))
ge(u, 0') → true
ge(0', s(v)) → false
ge(s(u), s(v)) → ge(u, v)

Types:
nthtail :: s:0' → nil:cons → nil:cons
cond :: true:false → s:0' → nil:cons → nil:cons
ge :: s:0' → s:0' → true:false
length :: nil:cons → s:0'
true :: true:false
false :: true:false
tail :: nil:cons → nil:cons
s :: s:0' → s:0'
nil :: nil:cons
cons :: nil:cons → nil:cons
0' :: s:0'
hole_nil:cons1_0 :: nil:cons
hole_s:0'2_0 :: s:0'
hole_true:false3_0 :: true:false
gen_nil:cons4_0 :: Nat → nil:cons
gen_s:0'5_0 :: Nat → s:0'

Lemmas:
ge(gen_s:0'5_0(n7_0), gen_s:0'5_0(n7_0)) → true, rt ∈ Ω(1 + n70)

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(gen_nil:cons4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))

No more defined symbols left to analyse.

(23) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
ge(gen_s:0'5_0(n7_0), gen_s:0'5_0(n7_0)) → true, rt ∈ Ω(1 + n70)

(24) BOUNDS(n^1, INF)